/*
 练习引用的特性
*/
#include <iostream>
double cube(double num);
double cuberef(double &num);

int main_cubes()
{
    double aNum = 3.5;
    using namespace std;
    cube(aNum);
    cout << "cube: " << aNum << endl;
    cuberef(aNum);
    cout << "cuberef: " << aNum << " address:" << &aNum << endl;
    /*

    */
    return 0;
}

double cube(double num) {
    num = num * num * num;
    using namespace std;
    cout << "cube address: " << &num << endl;
    return num;
}

double cuberef(double &num) {
    num = num * num * num;
    using namespace std;
    cout << "cuberef address: " << &num << endl;
    return num;
}
